﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chapter_7
{
    public delegate void DoubleOp(double value);
    class Program
    {
        static void Main(string[] args)
        {
            DoubleOp operations = MathOperations.MultiplyByTwo;
            operations += MathOperations.Square;
            operations(2.0);

            Connection myConnection = new Connection();
            Display myDisplay = new Display();
            myConnection.MessageArrived += new MessageHandler(myDisplay.DisplayMessage);
            myConnection.Connect();
            Console.ReadKey();
        }
    }
}
